安装Kubernetes(k8s)保姆级教程 | 您所在的位置:网站首页 › k8s 本地镜像 › 安装Kubernetes(k8s)保姆级教程 |
一、安装环境说明
硬件要求
内存:2GB或更多RAM CPU: 2核CPU或更多CPU 硬盘: 30GB或更多 本次环境说明:操作系统:CentOS 7.9 内核版本:3.10.0-1160 master: 192.168.68.106 node01: 192.168.68.107 node02: 192.168.68.108 转载请在文章开头附上原文链接地址: https://www.cnblogs.com/Sunzz/p/15184167.html 二、环境准备 1.关闭防火墙和selinux 关闭防火墙 systemctl stop firewalld && systemctl disable firewalld && iptables -F 关闭selinuxsed -i 's/enforcing/disabled/' /etc/selinux/config && setenforce 0 2. 关闭swap分区 临时关闭 swapoff -a 永久关闭swap sed -ri 's/.*swap.*/#&/' /etc/fstab 3.修改hosts文件 设置主机名(不设置也可以,但是要保证主机名不相同)master上 hostnamectl set-hostname master.localnode01 hostnamectl set-hostname node01.localnode02 hostnamectl set-hostname node02.local 修改本地hosts文件vi /etc/hosts 添加如下内容 192.168.68.106 master.local 192.168.68.107 node01.local 192.168.68.108 node02.local 4.修改内核参数 cat > /etc/sysctl.d/k8s.conf /etc/yum.repos.d/kubernetes.repo |
CopyRight 2018-2019 实验室设备网 版权所有 |